import { getPackLevelEnumSchema } from '@/enums/packLevelEnum';
import { AdColumn } from '@/components/AdVxeTable';
import { useI18n } from '@/hooks/web/useI18n';

const { t } = useI18n();
const packLevelEnumSchema = getPackLevelEnumSchema();

export const columns: AdColumn[] = [
  {
    title: t('routes.system.pack.nameTitle'),
    field: 'Name',
    width: 300,
    filterable: true,
    filterIndex: 'Type.Name',
    dataType: 'string',
  },
  {
    title: t('routes.system.pack.displayTitle'),
    field: 'Display',
    width: 300,
    filterable: true,
    filterIndex: 'Description',
    dataType: 'string',
  },
  {
    title: t('routes.system.pack.classTitle'),
    field: 'Class',
    // width: 400,
    minWidth: 200,
    filterable: true,
    filterIndex: 'Type.FullName',
    dataType: 'string',
  },
  {
    title: t('routes.system.pack.levelTitle'),
    field: 'Level',
    width: 100,
    filterable: true,
    dataType: 'enum',
    enumData: packLevelEnumSchema,
  },
  {
    title: t('routes.system.pack.orderNoTitle'),
    field: 'OrderNo',
    width: 100,
    filterable: true,
    dataType: 'number',
  },
  {
    title: t('routes.system.pack.isEnabledTitle'),
    field: 'IsEnabled',
    width: 80,
    filterable: true,
    dataType: 'boolean',
  },
];
